from typing import List

from nonebot.adapters.cqhttp import Bot as CQHTTPBot

from ..model.group import Group


async def getAllClass(bot: CQHTTPBot) -> List[Group]:
    group_list = await bot.get_group_list()
    result = []
    for g in group_list:
        result.append(Group(g['group_id'], g['group_name']))
    return result
